import request from '@/utils/request'

// 获取基本用户信息
export function getInfo() {
  return request({
    url: '/admin/account/my',
    method: 'get'
  })
}
// 注册
export function registry(data) {
  return request({
    url: '/pub/register',
    method: 'post',
    data
  })
}

// 验证账号
export function mobileCode(data) {
  return request({
    url: '/admin/account/mobileCode',
    method: 'post',
    data
  })
}

// 登录
export function login(data) {
  return request({
    url: '/pub/login',
    method: 'post',
    data
  })
}

// 忘记密码
export function forgetPwd(data) {
  return request({
    url: '/pub/forgetPwd',
    method: 'post',
    data
  })
}
//帮助列表
export function helpList() {
  return request({
    url: '/help/list',
    method: 'get',
  })
}
//帮助详情
export function helpDetail(id) {
  return request({
    url: `/help/detail/${id}`,
    method: 'get',
  })
}
//反馈列表
export function feedbackList(data) {
  return request({
    url: '/admin/help/feed-back/list',
    method: 'post',
    data
  })
}
//创建问题
export function createFeedback(data) {
  return request({
    url: '/admin/help/feed-back/create',
    method: 'post',
    data
  })
}
//更新问题
export function updateFeedback(data) {
  return request({
    url: '/admin/help/feed-back/update',
    method: 'post',
    data
  })
}
//个人信息设置
export function updatePerson(data) {
  return request({
    url: '/admin/account/setting',
    method: 'put',
    data
  })
}

